home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus Special 23
/
AMIGAplus Sonderheft 23 (2000)(Falke)(DE)[!].iso
/
Updates
/
Archivierer
/
UnZip_v5.32
/
Docs
/
unzipsfx.doc
< prev
next >
Wrap
Text File
|
1999-11-06
|
14KB
|
309 lines
UNZIPSFX(1L) UNZIPSFX(1L)
NAME
unzipsfx - self-extracting stub for prepending to ZIP
archives
SYNOPSIS
<name of unzipsfx+archive combo> [-cfptuz[ajnoqsCLV$]]
[file(s) ... [-x xfile(s) ...]]
DESCRIPTION
unzipsfx is a modified version of unzip(1L) designed to be
prepended to existing ZIP archives in order to form self-
extracting archives. Instead of taking its first non-flag
argument to be the zipfile(s) to be extracted, unzipsfx
seeks itself under the name by which it was invoked and
tests or extracts the contents of the appended archive.
Because the executable stub adds bulk to the archive (the
whole purpose of which is to be as small as possible), a
number of the less-vital capabilities in regular unzip
have been removed. Among these are the usage (or help)
screen, the listing and diagnostic functions (-l and -v),
the ability to decompress older compression formats (the
``reduce,'' ``shrink'' and ``implode'' methods), and the
ability to extract to a directory other than the current
one. Decryption is supported as a compile-time option but
should be avoided unless the attached archive contains
encrypted files.
Note that self-extracting archives made with unzipsfx are
no more (or less) portable across different operating sys-
tems than is the unzip executable itself. In general a
self-extracting archive made on a particular Unix system,
for example, will only self-extract under the same flavor
of Unix. Regular unzip may still be used to extract the
embedded archive as with any normal zipfile, although it
will generate a harmless warning about extra bytes at the
beginning of the zipfile. Despite this, however, the
self-extracting archive is technically not a valid ZIP
archive, and PKUNZIP may be unable to test or extract it.
This limitation is due to the simplistic manner in which
the archive is created; the internal directory structure
is not updated to reflect the extra bytes prepended to the
original zipfile.
ARGUMENTS
[file(s)]
An optional list of archive members to be pro-
cessed. Regular expressions (wildcards) similar to
those in Unix egrep(1) may be used to match multi-
ple members. These wildcards may contain:
* matches a sequence of 0 or more characters
? matches exactly 1 character
Info-ZIP 3 November 1997 (v5.32) 1
UNZIPSFX(1L) UNZIPSFX(1L)
[...] matches any single character found inside
the brackets; ranges are specified by a
beginning character, a hyphen, and an ending
character. If an exclamation point or a
caret (`!' or `^') follows the left bracket,
then the range of characters within the
brackets is complemented (that is, anything
except the characters inside the brackets is
considered a match).
(Be sure to quote any character that might other-
wise be interpreted or modified by the operating
system, particularly under Unix and VMS.)
[-x xfile(s)]
An optional list of archive members to be excluded
from processing. Since wildcard characters match
directory separators (`/'), this option may be used
to exclude any files that are in subdirectories.
For example, ``foosfx *.[ch] -x */*'' would extract
all C source files in the main directory, but none
in any subdirectories. Without the -x option, all
C source files in all directories within the zip-
file would be extracted.
If unzipsfx is compiled with SFX_EXDIR defined, the fol-
lowing option is also enabled:
[-d exdir]
An optional directory to which to extract files.
By default, all files and subdirectories are recre-
ated in the current directory; the -d option allows
extraction in an arbitrary directory (always assum-
ing one has permission to write to the directory).
The option and directory may be concatenated with-
out any white space between them, but note that
this may cause normal shell behavior to be sup-
pressed. In particular, ``-d ~'' (tilde) is
expanded by Unix C shells into the name of the
user's home directory, but ``-d~'' is treated as a
literal subdirectory ``~'' of the current direc-
tory.
OPTIONS
unzipsfx supports the following unzip(1L) options: -c and
-p (extract to standard output/screen), -f and -u (freshen
and update existing files upon extraction), -t (test
archive) and -z (print archive comment). All normal list-
ing options (-l, -v and -Z) have been removed, but the
testing option (-t) may be used as a ``poor man's'' list-
ing. Alternatively, those creating self-extracting
archives may wish to include a short listing in the zip-
file comment.
Info-ZIP 3 November 1997 (v5.32) 2
UNZIPSFX(1L) UNZIPSFX(1L)
See unzip(1L) for a more complete description of these
options.
MODIFIERS
unzipsfx currently supports all unzip(1L) modifiers: -a
(convert text files), -n (never overwrite), -o (overwrite
without prompting), -q (operate quietly), -C (match names
case-insenstively), -L (convert uppercase-OS names to low-
ercase), -j (junk paths) and -V (retain version numbers);
plus the following operating-system specific options: -X
(restore VMS owner/protection info), -s (convert spaces in
filenames to underscores [DOS, OS/2, NT]) and -$ (restore
volume label [DOS, OS/2, NT, Amiga]).
(Support for regular ASCII text-conversion may be removed
in future versions, since it is simple enough for the
archive's creator to ensure that text files have the
appropriate format for the local OS. EBCDIC conversion
will of course continue to be supported since the zipfile
format implies ASCII storage of text files.)
See unzip(1L) for a more complete description of these
modifiers.
ENVIRONMENT OPTIONS
unzipsfx uses the same environment variables as unzip(1L)
does, although this is likely to be an issue only for the
person creating and testing the self-extracting archive.
See unzip(1L) for details.
DECRYPTION
Decryption is supported exactly as in unzip(1L); that is,
interactively with a non-echoing prompt for the pass-
word(s). See unzip(1L) for details. Once again, note
that if the archive has no encrypted files there is no
reason to use a version of unzipsfx with decryption sup-
port; that only adds to the size of the archive.
EXAMPLES
To create a self-extracting archive letters from a regular
zipfile letters.zip and change the new archive's permis-
sions to be world-executable under Unix:
cat unzipsfx letters.zip > letters
chmod 755 letters
zip -A letters
To create the same archive under MS-DOS, OS/2 or NT (note
the use of the /b [binary] option to the copy command):
copy /b unzipsfx.exe+letters.zip letters.exe
zip -A letters.exe
Under VMS:
Info-ZIP 3 November 1997 (v5.32)